package gui.entity;

import generated.domain.world.World;

import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.ui.views.properties.IPropertySource;

public class WorldEntity implements IAdaptable {
	private World world;
	private Object worldElementPropertySource;

	public WorldEntity(World pWorld) {
		world = pWorld;
	}

	public Object getAdapter(Class adapter) {
		if (adapter == IPropertySource.class) {
			if (worldElementPropertySource == null) {
				worldElementPropertySource = new WorldElementPropertySource(
						this);
			}
			return worldElementPropertySource;
		}
		return null;
	}

	/**
	 * @return the world
	 */
	public World getWorld() {
		return world;
	}
}